// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import './plugins/axios'
import App from './App'
import router from './router'
import axios from 'axios'
import { store } from './store'

Vue.config.productionTip = false
axios.defaults.baseURL = "https://pizza-10aa1.firebaseio.com/"
//全局路由守卫

// router.beforeEach((to, from, next) => {
//   // alert("请先登录！")
//   if (to.path == '/Login' || to.path == '/Regsiter') {
//     next()
//   } else {
//     alert("请先登录！")
//     next('/Login')
//   }
// })

//后置钩子
// router.afterEach((to,from) => {
//   alert("afterEach")
// })

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
